# Contributor: Stuart Cardall <developer@it-offshore.co.uk>
# Maintainer: Stuart Cardall <developer@it-offshore.co.uk>
pkgname=isync
pkgver=1.4.4
pkgrel=0
pkgdesc="IMAP and MailDir mailbox synchronizer"
url="https://isync.sourceforge.io"
arch="all"
license="GPL-3.0-or-later"
makedepends="openssl1.1-compat-dev cyrus-sasl-dev zlib-dev perl-dev"
subpackages="$pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://downloads.sourceforge.net/sourceforge/isync/isync-$pkgver.tar.gz"

# secfixes:
#   1.4.4-r0:
#     - CVE-2021-3657
#     - CVE-2021-44143
#   1.4.2-r0:
#     - CVE-2021-3578
#   1.4.1-r0:
#     - CVE-2021-20247

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man
	make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="
b769f474f2296764cabaae7e2b23e47c22714fca5919e9f1c916ed70b18c71c0bc9301fff0f64434f4f0ae28c9d16216e72556b48014ec94d1b7646de7183011  isync-1.4.4.tar.gz
"
